package com.lzh.lojcodesandbox.model;

import com.lzh.lojcodesandbox.enums.ErrorCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Author luzhiheng
 * @Date 2023/8/29 9:42
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ExecuteCodeResponse {

    /**
     * 输出列表
     */
    private List<String> outpuList;

    /**
     * 接口信息
     */
    private String message;

    /**
     * 执行状态
     */
    private Integer status;

    /**
     * 判题信息
     */
    private JudgeInfo judgeInfo;

    /**
     * 状态（0正常 1编译错误）
     */
    private Integer errorCode;

    public ExecuteCodeResponse(ErrorCodeEnum errorCodeEnum) {
        this.errorCode = errorCodeEnum.getValue();
        this.message = errorCodeEnum.getText();
    }
}
